import Vue from 'vue'
import Vuex from 'vuex'
import menustore from '@/store/menuStore/menuStore'
import admin from '@/store/adminStore/adminStore'

import createPersistedstate from 'vuex-persistedstate'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
  },
  getters: {
  },
  mutations: {
  },
  actions: {
  },
  modules: {
    menustore,
    admin
  },
  // 将插件配置到Vuex的plugins中
  plugins: [
    createPersistedstate({
      key: 'erabbit-client-pc-store', // 存数据的key名   自定义的  要有语义化
      paths: ['admin', 'menustore'] // 要把那些模块加入缓存
    })
  ]
})
